#include<bits/stdc++.h>
using namespace std;
int n,r[100010],rr[100010],t;
queue<int> q;
bool cmp(int a,int b)
{
    return a>b;
}
inline int read()
{
	int x=0,f=1;
	char c=getchar();
	while(!isdigit(c)&&c!='-') c=getchar();
    if(c=='-')
    {
        f=-1;
        c=getchar();
    }
    while(isdigit(c))
    {
        x=x*10+c-'0';
        c=getchar();
    }
    return x*f;
}
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    n=read();
    for(int i=1;i<=n;i++) r[i]=read();
    sort(r+1,r+n+1);
    for(int i=1;i<=n;i++)
    {
        q.push(r[i]);
        if(r[i]>q.front()) q.pop();
    }
    cout<<q.size()<<endl;
    return 0;
}
